/**
 * Created with JetBrains WebStorm.
 * User: P0018766
 * Date: 13-1-23
 * Time: 下午4:54
 * To change this template use File | Settings | File Templates.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var OrderSchema = new Schema({
    buyerAddress:{ type:String },
    userId:{ type:Schema.ObjectId },
    shopId:{ type:Schema.ObjectId },
    totalPrice:{ type:Number},
    sellerPhone:{ type:Number},
    buyerPhone:{ type:Number},
    dish:[{
            name:String,
            num:Number,
            price:Number
        }]
});

mongoose.model('Order', OrderSchema);
